#include <iostream>
using namespace std;

int main()
{ int n, a, b, s;
  cin >> n >> a >> b >> s;
  srand(s);

  cout << n << endl;
  for(int i=0; i<n; i++)
  { int x = a+ rand() % (b-a+1);
    cout << x << " ";
  }
  cout << endl;

  return 0;
}
